Transcoder for a variable length coded data stream

ABSTRACT

The invention relates to a transcoder ( 100 ) for a variable length coded data stream such as an MPEG 2 coded data stream transcoder ( 100 ) comprises a receiver (101) which receives the variable length coded data stream. The receiver (101) is connected to a significance processor ( 107 ) that determines if a variable length coded coefficient is significant or less significant. The significance processor ( 107 ) is connected to a truncation processor ( 111 ) which truncates the less significant coefficients. The trancoder further comprises an encode processor ( 109 ) which generates a transcoded data stream from the original significant coefficients and the truncated less significant coefficients. All processing may be performed exclusively in the variable length code domain thereby providing a low complexity and high speed transcoder.

FIELD OF THE INVENTION

The invention relates to a transcoder and a method of transcoding for avariable length coded data stream and in particular for transcoding of acompressed video data stream.

BACKGROUND OF THE INVENTION

Video signals are increasingly being broadcast and distributed asdigital video signals. In order to maintain low data rates, variousforms of video compression are normally used. Consequently, a number ofdifferent video compressions standards have been defined. A widely usedcompression standard is the MPEG-2 (Moving Picture Expert Group-2)standard which is used in for example terrestrial and satellite digitalTV broadcasting, DVDs and digital video recorders.

The MPEG-2 video standard comprises a number of different levels andprofiles allowing for different data rates and the complexity ofencoders and decoders to be traded off against the video quality.

During the transmission of a compressed video stream from a source toend terminals, it is frequently necessary to adjust the bit rate of thecompressed stream according to the current capacity of the channel orcapabilities of the decoder. Such bit-reducing operations are typicallyperformed by a transcoder which comprises a cascade of the operations ofdecoding and an encoding. The decoding part completely reconstructs avideo stream and feeds it to an encoder that generates the new streamwith a lower bit rate.

Generally, independent decoding and encoding of an MPEG stream may leadto degradation of video quality. Decisions taken during the re-encodingdo not take into account the parameters of the original encoding.Moreover, although some elements may be shared between an encoder anddecoder, a cascaded implementation is complex and expensive as both afull decoder and encoder functionality needs to be implemented.

Additionally, transcoders have been developed wherein the received videosignal is decoded to the pixel domain or a Discrete Cosine Transform(DCT) domain. The compression parameters are then modified in thisdomain and the signal is re-encoded. However, this approach is stillcomputational intensive. Furthermore, the effect on the transcoded bitrate from operations in the pixel or DCT domain cannot easily bedetermined or controlled.

In recent years, the popularity of multimedia networks has grownrapidly. Typically, these networks, among other things, transmit videoinformation in compressed streams. In most cases, multimedia networksare heterogeneous comprising different types of wired or wirelesschannels and sets of decoders with different capabilities. In the caseof wireless networks, the wireless communication channel typicallyprovides extremely low guaranteed minimum Quality of Service levels.Consequently, the variation of the channel bandwidth and quality istypically spurious and unpredictable. Additionally, the range ofdifferent capabilities and requirements of decoders may be very large.Accordingly, a compressed stream should preferably be able to quicklyadapt its bit-rate to the current channel bandwidth. Additionally,changes in the channel characteristics should not result in unacceptabledegradation of video quality.

Therefore, in order to transmit one compressed video stream to decodershaving different functionality, capabilities and requirements, scalablecoded video streams are sometimes used. The scalability allows thedecoder to take a portion of the video stream and decode a full picturetherefrom. Thus the scalability allows the decoder to take a portion ofthe transmitted stream and decode the picture with reduced quality orresolution. The quality level of the decompressed image depends on howmuch of the video stream is used by the decoder, and on how the scalablecompressed stream is organised.

Generally, scalability is useful when interaction between the encoderand decoder is limited or absent such as one-to-many communication, nonreal-time applications, etc. In the current video coding standards likeMPEG-2 or MPEG-4, scalability is implemented through a layeredstructure, where encoded video information is divided into two or morebitstreams corresponding to the different layers. The more layers thatare received, the better quality or higher resolution could be achievedduring decoding. Specifically a base layer is provided that comprisessufficient information to regenerate a video signal albeit at lowquality. In addition, one or more enhancement layers are providedcomprising additional information that may be used to increase thedecoded video quality.

Hence, it is desirable to provide scalable streams and specifically atranscoder, which is able to provide a scalable stream is advantageous.Current transcoders capable of providing a scalable stream from anon-scalable stream are typically implemented by cascading a fullnon-scalable decoder and a full scalable encoder. Unfortunately, such anapproach is complex, expensive and cannot provide fast and flexibleadaptation of the bit-rate.

Hence, current transcoders tend to be suboptimal and in particularcomplex, expensive to implement, inflexible, have high delays, havelimited data rate capability and adaptability and are resourcedemanding. Hence, an improved system for transcoding would beadvantageous.

SUMMARY OF THE INVENTION

Accordingly, the Invention seeks to mitigate, alleviate or eliminate oneor more of the above mentioned disadvantages singly or in anycombination.

According to a first aspect of the invention, there is provided atranscoder for a variable length coded data stream comprising: areceiver for receiving the variable length coded data stream comprisingvariable length coded coefficients; a significance processor fordetermining if variable length coded coefficients are significantcoefficients or less significant coefficients in accordance with asignificance criterion; a truncation processor for truncating the lesssignificant coefficients; an encode processor for generating atranscoded data stream comprising significant coefficients and truncatedless significant coefficients.

The transcoded data stream may thus be provided based on operations anddeterminations performed in the variable length code domain, andspecifically, the transcoded data stream may be generated based only onoperations performed in the variable length code domain. The operationsand determinations may be performed directly on the variable lengthcoded data stream, and the transcoder may generate a transcoded datastream without performing any domain transformations or (inverse)quantisation adjustments. This allows for a very low complexity and costof the transcoder. Specifically, memory space and memory bandwidthrequirements may be very low allowing for a simple transcoder.

In addition, the processing in the variable length code domain allowsfor a fast transcoding therefore making the transcoder suitable forhigher bit rate data streams. Also, delay incurred by the transcodingmay be kept low or reduced. Furthermore, the transcoder may be enabledto perform a transcoding without having specific information of othercoding schemes than the variable length code used. Specifically, if atranscoder has information of the variable length protocol of thevariable length code, the same transcoder may transcode differentlyencoded signals, such as for example signals encoded by differentcompression schemes. This may allow for a single (uniform) bit-ratecontrol mechanism independent on the compression standard

Additionally, the invention may allow for an improved quality of thetranscoded data stream as any quality degradation associated withprocessing steps not in the variable length code domain can be avoided.

The transcoder is particularly suitable for transcoding a higher bitrate data stream to a lower bit rate data stream. Preferably, thevariable length coded data stream is a compressed digital video signalstream. Hence, a very fast and/or low complexity transcoding may beachieved for video signals compressed in accordance with a widespreadvideo compression scheme. The transcoding requires no de-quantisation orre-quantisation, nor any inverse or forward Discrete CosineTransformation. It therefore allows for reduced complexity, increasedspeed and/or improved video quality.

Furthermore, a very direct and thus precise control of the data streamis enabled as the transcoded data stream for example may be achieveddirectly by bit manipulation of the variable length coded data stream.Hence, the effect on the variable length code words of the transcodeddata stream is directly known. In contrast to conventional transcodingschemes, the characteristics of the transcoded data stream may bedirectly known and affected, and thus for example a bit rate reductionmay be directly managed by control of the data bits of the transcodeddata stream.

The receiver, significance processor, truncation processor and encodeprocessor may be separate functional units or may be different aspectsor functionality of the same functional unit or process. Specifically,the receiver, significance processor, truncation processor and encodeprocessor may be implemented as a software programme in a singlesuitable data processor, such as a Digital Signal Processor. Thetruncation of the less significant coefficients may specifically beachieved by a shifting operation.

According to a feature of the invention, the truncation comprisessetting a value of the less significant coefficients to zero.Preferably, the truncation of less significant coefficients is to zerovalue coefficients, which typically have the lowest word length invariable length codes. Alternatively or additionally, zero coefficientsare particularly suited for run length coding thereby allowing for thepossibility of a significant data rate reduction of the transcodedsignal.

According to a feature of the invention, the significance criterioncomprises a criterion of whether a value of a variable length codedcoefficient is above a threshold. Specifically, a variable lengthencoded coefficient may be considered significant if it has a value(such as a level in an MPEG-2 coded data stream) above the threshold,and less significant if it has a value below the threshold. Thetruncation may thus only be performed for a variable length codedcoefficient if the value of the coefficient is below a threshold.Truncation of only less significant coefficients may improve the qualityof the transcoded signal as only information for less significantcoefficients is discarded. A threshold value provides a suitable and lowcomplexity means for determining the significance of a coefficient andthe degree of bit rate reduction of the transcoding.

According to a feature of the invention, the significance criterion isdetermined in response to an associated frequency parameter of a signalencoded by the variable length coded stream.

In most signals, the quality degradation incurred by loss of informationis higher when it relates to some frequency ranges than other. Forexample, video degradation is more sensitive to low spatial frequencycoefficient errors. Truncating coefficients dependent on an associatedfrequency parameter of the coefficients therefore provide for increasedquality of the decoded signal. Specifically, for an MPEG-2 compressedvideo signal, the significance criterion may be different depending onthe spatial frequency associated with a coefficient. For example, lowerfrequency coefficients may be considered significant and higherfrequency coefficients may be considered less significant. Thesignificance criterion for a coefficient may thus depend on where in theDiscrete Cosine Transformation block it is located.

According to a feature of the invention, the variable length codedcoefficients are run length coded. Run length coding may provide for avery efficient coding of data streams comprising a high number of zerocoefficients and are therefore particularly suitable for the truncationperformed in the transcoding.

According to a feature of the invention, the significance criterioncomprises a criterion of whether a run length of a sequence of variablelength coded coefficients is above a threshold. Many signals, such asfor example an MPEG 2 encoded video signal, tend to have increasingconcentration of zero coefficients in sections of relatively lowerquality significance. A significance criterion taking into account thenumber of zero coefficients proximal to a non-zero coefficient thusprovides an advantageous significance criterion for many signals. Thesequence may specifically comprise a single variable length codedcoefficient.

According to a feature of the invention, a run length value of asignificant coefficient is modified to reflect increased zerocoefficients resulting from truncation of less significant coefficientsto a zero value.

Preferably, the run length value of a significant coefficient ismodified to reflect an increased number of preceding zero coefficientsresulting from truncation of less significant coefficients to a zerovalue. A very efficient transcoding of an encoded data stream may beachieved simply by including information on the number of truncated lesssignificant coefficients in the run length information of thesignificant coefficients.

According to a feature of the invention, the transcoder furthercomprises a subset processor for providing a subset of the variablelength coded data stream to the encode processor; and wherein the encodeprocessor is operable to directly include the subset of the variablelength coded data stream in the transcoded data stream.

Preferably, some data of the variable length coded data stream aredirectly included in the transcoded data stream. This may allow forreduced complexity and increased speed of the transcoding as only asubset of the variable length coded data stream need to be processed. Itmay further ensure that some data having a high quality impact may bemoved to the transcoded data stream unaffected by the transcoding.

According to a feature of the invention, the subset of the variablelength coded data stream comprises variable length coded coefficientsassociated with low frequency parameters of a signal coded by thevariable length coded stream.

For many signals, such as a compressed video signal, the qualitysensitivity to data errors is higher for data associated with lowfrequencies than with higher frequencies. Hence, directly includingvariable length coded coefficients associated with low frequencyparameters of the signal in the transcoded data stream allows forimproved quality. It may further result in faster and/or lowercomplexity transcoding.

According to a feature of the invention, the subset of the variablelength coded data stream comprises variable length coded coefficientsassociated with motion compensation parameters of a video signal codedby the variable length coded stream. Advantageously, any motioncompensation parameters, including motion estimation parameters, maydirectly be included in the transcoded data stream.

According to a feature of the invention, the subset of the variablelength coded data stream comprises control data. Advantageously, anycontrol data of the variable length coded data stream may directly beincluded in the transcoded data stream.

According to a feature of the invention, the subset of the variablelength coded data stream comprises header data. Advantageously, anyheader data of the variable length coded data stream may directly beincluded in the transcoded data stream thereby allowing for a transcodeddata stream having a format consistent with the variable length codeddata stream.

According to a feature of the invention, the truncation processor isfurther operable to perform a diminution operation on values of thesignificant coefficients. The diminution may preferably be of thecoefficient values, such as the variable length code levels for anMPEG-2 compressed signal. The diminution operation may preferably resultin a lower word length for at least some values of the significantcoefficients.

According to a feature of the invention, the diminution operation is ashifting operation. Provided the shifting value is known at a receiverof the transcoded data stream, the original value may be regeneratedwithout loss of information. The shifting operation may thus reduce thedata rate of the transcoded data stream without a loss of informationfor the higher value coefficients.

According to a feature of the invention, the diminution operationdepends on an associated frequency parameter of a signal encoded by thevariable length coded stream.

The diminution operation may result in loss of information (ortruncation) for low variable length code coefficient values, and thediminution operation is therefore preferably varied in response to thetypical coefficient values or variation. Alternatively or additionally,the diminution operation may be varied in response to a quality impactof loss of information characteristic. These characteristics aretypically related to the frequency associated with the variable lengthcode coefficient on which the diminution operation is performed.Advantageously, the parameters of the diminution operation may thus bevaried for different coefficients depending on an associated frequencyparameter. Specifically, for an MPEG 2 encoded data stream, thediminution performed may depend on the coefficient's position in theDiscrete Cosine Transformation block.

According to a feature of the invention, the diminution operationdepends on a run length associated with at least one variable lengthcoded coefficient. This may for example allow for diminution of spuriouscoefficients (located in the middle of long sequences of zeros) more,than coefficients within a significant zone (with small number ofzeros).

According to a feature of the invention, a diminution operationparameter is depending on a plurality of coefficient values of thesignificant coefficients. Preferably, at least one parameter of thediminution operation, such as the shifting value of a shiftingoperation, is optimised for the coefficient values of at least a subsetof the variable length coded data stream. Specifically, the parametersof a shifting operation may be selected such that a suitable datareduction is achieved by the shifting operation for the currentdistribution of coefficient values in the subset.

According to a feature of the invention, a diminution operationparameter depends on an achievable word length reduction for at leastone of the significant coefficients. Preferably the diminution operationparameters are selected such as to achieve a word length reduction foras many significant coefficients as possible while still retaining adesired information level and thus quality level.

According to a feature of the invention, the encode processor isoperable to generate a scalable signal data stream comprising thetranscoded data stream as a base layer and at least one additionalenhancement layer.

A transcoded scalable signal data stream may thus be provided comprisinga base layer allowing for reduced quality signal to be derived. Thesignal may be further improved by including additional information ofthe at least one enhancement layer. Preferably, the transcoder thusgenerates a base layer from the transcoded data stream. The base layermay preferably provide a reduced but acceptable quality representationof the signal of the variable length coded data stream but at a reduceddata rate. A decoder may generate an acceptable signal based only on thebase layer (including the transcoded data stream) or may optionallyutilise the additional information of the enhancement layer to improvethe quality. This allows for the transcoder to be used with differenttypes of decoders and distribution mediums with varying characteristics.

According to a feature of the invention, the truncation processor isoperable to generate remainder coefficient values associated with thetruncation of the less significant coefficients, and the at least oneadditional enhancement layer comprises at least some of the remaindercoefficient values.

Preferably, the information lost by the truncation of the truncationprocessor is comprised in the remainder coefficients. The at least oneadditional enhancement layer thus preferably comprises the informationlost during the truncation process. This allows for a decoder tooptionally use the enhancement layer to counter the loss in quality ofthe transcoded data stream with respect to the variable length codeddata stream.

According to a feature of the invention, the truncation processor isoperable to perform a shifting operation on the significant coefficientsand to generate remainder coefficient values associated with theshifting operation; and the at least one additional enhancement layercomprises at least some of the remainder coefficient values.

Preferably, the information lost by the shifting operation of thetruncation processor is comprised in the remainder coefficients. The atleast one additional enhancement layer thus preferably comprises theinformation lost during the shifting operation. This allows for adecoder to optionally use the enhancement layer to counter the loss inquality of the transcoded data stream with respect to the variablelength coded data stream.

According to a feature of the invention, the truncation processor isfurther operable to perform a second shifting operation on the remaindercoefficient values and to generate second remainder coefficient values,and the encoding processor is operable to include at least some of thesecond remainder coefficient values in a second enhancement layer.

Preferably, the remainder coefficient values are further divided intodifferent levels by a shifting operation. Each further refinement of theinformation is included in an additional enhancement layer. This allowsfor an increased granularity in the available quality levels to adecoder.

According to a second aspect of the invention, there is provided anencoder for encoding a signal comprising: a signal encoder forgenerating a variable length coded data stream from the signal; thevariable length coded data stream comprising variable length codedcoefficients; a significance processor for determining if variablelength coded coefficients are significant coefficients or lesssignificant coefficients in accordance with a significance criterion; atruncation processor for truncating the less significant coefficientsand for generating remainder coefficient values associated with thetruncation of the less significant coefficients; and an encode processorfor generating a scalable signal data stream comprising a base layercomprising significant coefficients and truncated less significantcoefficients and an enhancement layer comprising at least some of theremainder coefficient values.

According to a third aspect of the invention, there is provided adecoder for decoding a scalable content signal data stream; the decodercomprising: a receiver for receiving the scalable content signal datastream; the scalable content signal data stream comprising a base layercomprising significant coefficients and truncated less significantcoefficients, and an enhancement layer comprising remainder coefficientvalues associated with the truncated less significant coefficients; acombine processor for generating a combined data stream from combiningthe variable length coded coefficients and truncated less significantcoefficients of the base layer and the remainder coefficient values ofthe enhancement layer; and a decode processor for generating a decodedsignal in response to the combined data stream.

According to a fourth aspect of the invention, there is provided adecoder for decoding a variable length coded data stream; the decodercomprising: a receiver for receiving a variable length coded data streamcomprising variable length coded coefficients having shifted coefficientvalues; and a shift processor for generating a shift compensated datastream by performing an inverse shifting operation on the variablelength coded coefficients having shifted coefficient values; and adecode processor for generating a decoded signal in response to theshift compensated data stream.

According to a feature of the invention, the decoder further comprises ashift value receiver for receiving a shift value parameter associatedwith the shifted coefficient values and wherein the inverse shiftingoperation is determined in response to the shift value parameter.

According to a fifth aspect of the invention, there is provided a methodof transcoding of a variable length coded data stream, the methodcomprising the steps of: receiving the variable length coded data streamcomprising variable length coded coefficients; determining if variablelength coded coefficients are significant coefficients or lesssignificant coefficients in accordance with a significance criterion;truncating the less significant coefficients; and generating atranscoded data stream comprising significant coefficients and truncatedless significant coefficients.

These and other aspects of the invention will be apparent from andelucidated with reference to the embodiment(s) described hereinafter.

BRIEF DESCRIPTION OF THE DRAWINGS

An embodiment of the invention will be described, by way of exampleonly, with reference to the drawings, in which

FIG. 1 is an illustration of a transcoder in accordance with anembodiment of the invention;

FIG. 2 is an illustration of an example of a shifting matrix for ashifting operation in accordance with an embodiment of the invention;

FIG. 3 is an illustration of a transcode processor for generating ascalable data stream in accordance with an embodiment of the invention.

DESCRIPTION OF PREFERRED EMBODIMENTS

The following description focuses on an embodiment of the inventionapplicable to a transcoder for a variable length encoded video datastream and in particular to an MPEG 2 coded video data stream. However,it will be appreciated that the invention is not limited to thisapplication but may be applied to many other applications and variablelength coded data stream including for example audio or multimediastreams.

FIG. 1 is an illustration of a transcoder 100 in accordance with anembodiment of the invention.

The trancoder 100 comprises a receiver 101 which in the preferredembodiment receives an MPEG 2 encoded video signal from an externalsource 103.

The receiver 101 is connected to a subset processor 105. The receiveddata stream is fed to the subset processor 105. The subset processor 105analyses the received data stream and divides the data into picture dataand control data. The control data comprises header information andother data not directly related to the images of the video signal. Thesubset processor is connected to a significance processor 107 and anencode processor 109, and in the preferred embodiment, the control datais fed directly to the encode processor 109 and the picture da is fed tothe significance processor 107.

The significance processor 107 is thus fed a stream of variable lengthcoded video data The significance processor analyses this data in thevariable length code domain and divides the variable length codedcoefficients into significant coefficients and less significantcoefficients. Any suitable criteria or criterion may be used fordetermining if a variable length coded coefficient is significant orless significant but in the preferred embodiment, a coefficient issimply considered significant if it has a coefficient value above acertain threshold.

The significance processor 107 is connected to a truncation processor111. The truncation processor 111 comprises a truncation element 113 towhich the less significant coefficients are fed. The truncation element113 performs a truncation operation on the less significantcoefficients. The truncation may be any suitable operation butpreferably reduces the number of bits required to represent thecoefficient in the variable length code. As such, the truncation may beperformed by directly truncating coefficients in response to a look-uptable of corresponding non-truncated and truncated coefficient values. Atruncation operation may optionally be performed by a shifting operationperformed on a less significant coefficient, and specifically the lesssignificant bits may be dropped by such an operation. Hence, preferably,the truncation operation achieves a bit reduction but may consequentlyresult in loss of information.

In the preferred embodiment, the truncation is achieved by setting thevalue of all coefficients determined to be less significant coefficientsto a zero value. In most variable length code schemes, the zerocoefficient value requires the least number of bits to be represented.In addition, coding schemes, such as MPEG2, further comprises run lengthcoding of the variable length code data thereby having a highlyefficient representation of consecutive zero values. Accordingly,setting coefficient values to zero may lead to a very significant bitrate reduction.

In some embodiments, the truncation processor 111 does not perform anyoperations on the significant coefficients. However, in the preferredembodiment, the truncation processor 111 further comprises a diminutionelement 115, which performs a diminution operation on the significantcoefficients. The diminution operation performs an arithmetic reductionon the significant coefficients and specifically performs a shiftingoperation on the coefficients. Specifically the shifting operation of avariable length code representation of a coefficient of sufficient valuemay lead to a bit rate reduction without a resultant loss ofinformation, as the decoder may regenerate the original value by aninverse shifting operation.

The truncation processor 111 is connected to the encode processor 109,which is fed the truncated less significant coefficients and the(possibly diminuted) significant coefficients. In the preferredembodiment of an MPEG 2 signal further comprising run length coding, therun length values of the significant coefficients are modified toinclude the number of truncated zero coefficients of the lesssignificant coefficients, and a data stream comprising both thesignificant and less significant coefficients are fed to the encodeprocessor 109. The encode processor combines the control data, thesignificant coefficients and the truncated less significant coefficientsinto a transcoded data stream. In the preferred embodiment, the receivedMPEG2 signal is thus regenerated but with the less significantcoefficients replaced by zero coefficients. Accordingly, a bit ratereduction of the original data stream has been achieved. Hence, thereduction in the bit rate of the data stream may be achieved entirely byoperations in the variable length code domain. Accordingly, thetranscoder need not perform quantisation/requantisation, forward/reverseDiscrete Cosine Transformations, scanning etc as is normally associatedwith transcoders for data streams such as MPEG2 data streams.

Further aspects and details of the operation of the decoder of FIG. 1will be described in the following. The description will specificallyconcentrate on transcoding of an MPEG 2 coded signal.

In the preferred embodiment, the subset processor 105 analyses thereceived data stream and divides out all data relating to the block,macroblock headers and motion vectors. These data should not bemodified, and they are therefore fed to the encode processor for directinclusion in the transcoded data stream.

The remaining data correspond to DCT coefficients that have been encodedusing a variable length code and run length coding as is well known inthe art. Specifically, the DCT coefficients are encoded according totables B-14, B-15 and B-16 of the MPEG standard [ISO/IEC, InternationalStandard 13818-2, Recommendation ITU-T H.262 InformationTechnology—Generic Coding of Moving Picture and Associated AudioInformation: Video, 1995]. In accordance with this scheme, non-zerocoefficients are represented by variable length coding of a value givenas (R,L) wherein R is the run value of the coefficient, corresponding tothe number of preceding zero value coefficients, and L is the level orvalue of the non-zero coefficient.

In the significance processor 107, the quantised DCT coefficients aredivided into significant coefficients and less significant coefficients.The significance criterion used for this division preferably considersvarious characteristics of the individual coefficient including whetherit has a value above a threshold, what the associated spatial DCTfrequency of the coefficient is and what the run length for thecoefficient is (such as the quantity of preceding zero coefficients).

Specifically, in the preferred embodiment, a coefficient is consideredless significant if it satisfies the following condition:R>Rt & n>Nt & L<Lt,  (1)where R is run value of the coefficient, n is the position of thecoefficient in a one-dimensional matrix of a zig-zag scanned MPEG2 DCTblock, L is the coefficient value known as the level of the coefficientand Rt, Nt and Lt are the corresponding threshold parameters for thetruncation. The values of Rt, Nt and Lt may be changed in accordancewith the parameters and requirements of the transcoder, and inparticular in response to the desired transcoded bit rate.

The value Lt corresponds to a maximum threshold value of the value orlevel of a coefficient for it to be considered a less significantcoefficient. Hence, all coefficient values higher than Lt are consideredsignificant and thus will not be truncated. This minimises videodegradation as all values comprising significant frequency componentsare considered significant.

The value Nt defines how many coefficients from the beginning of thescanned block should be considered significant coefficients and thus notbe truncated. These first coefficients of the block are DC andlow-frequency AC coefficients. They represent the most importantinformation for the video quality and changing these may lead tosignificant visual distortion of the reconstructed image.

All coefficients that satisfy condition (1) are in the preferredembodiment truncated to zero. This results in loss of information and isthus a lossy operation. By truncating to a zero value, no variablelength codeword is preferably produced for these coefficients. The valueof Rt defines a minimal number of zeros, which should precede a lesssignificant coefficient. Because the probability of zeros is higher inthe high-frequency region of an MPEG2 DCT block (the low-right corner ofthe DCT block), this requirement allows for an efficient exploitation ofthe nature of a zig-zag scanning of the DCT block for suppression ofhigh-frequency coefficients with low-value.

If the previous coefficient has been truncated to zero, and the currentcoefficient does not satisfy condition (1), the value (L) of the currentcoefficient remains unchanged, but its run length value (R) is updatedaccording to (2):R _(i) ′=R _(i-1)+1+R _(i)  (2)where R_(i)′ is the new value of run parameter of current coefficient;R_(i-1) is the original value of run parameter of previous run-lengthcoefficient, truncated to zero; and R_(i) is the original value of therun parameter of the current run-length coefficient. Hence, the runlength value of a significant coefficient is preferably modified toreflect increased zero coefficients resulting from truncation of lesssignificant coefficients to a zero value.

If the previous coefficient has not been truncated and the currentcoefficient is significant (does not satisfy condition (1)), then the Rand L values remain unchanged. The variable length code of such acurrent coefficient may be fed to the encode processor 109 for directinclusion in the transcoded stream. In this way, only significantcoefficients with a preceding less significant coefficient need to bevariable length re-coded. The variable length codes of other significantcoefficients may be copied without change. This provides for a lowcomplexity transcoding providing a bit rate reduced transcoded datastream.

In the preferred embodiment, the transcoded bit rate is preferablyfurther reduced by performing a diminution operation on the significantcoefficients. Specifically, the value (and specifically the L-value) ofthe current coefficient is reduced by a shifting operation. Shifting maybe considered a subtraction (reduction) by the some parameter S from theL values of coefficients within a DCT block.

An example of a variable length code used in MPEG2 is the following:TABLE 1 Variable length code table of DCT coefficients (derived fromB-14 [5]). VL codeword R L VL codeword R L 011s 1 1 0101s 2 1 0001 10s 12 0000 100s 2 2 0010 0101s 1 3 0000 0010 11s 2 3 0000 0011 00s 1 4 00000001 0100s 2 4 0000 0001 1011s 1 5 0000 0000 1010 0s 2 5 0000 0000 10110s 1 6 ESCAPE code 2 6

According to table 1, shifting of the L parameter from 3 to 1 for R=2will reduce the variable length codeword by 6 bits. At the decodingside, the L value of the received coefficients should be shifted backfrom 1 to 3 by adding a shifting parameter to the received L value.Therefore, shifting does not introduce any extra loss of information.

Specifically, the shifting process preferably includes dropping(truncation) of coefficients with a value (level) lower than the givenshifting parameter value. If S is a shifting value indicating the numberof levels to switch a given L value, then a corresponding truncationlevel of Lt=S is effectively achieved. Therefore, the truncationoperation of less significant coefficients may be implemented as part ofthe shifting operation corresponding to Lt=S and Rt=0 in condition (1).

The shifting parameter S, as well as thresholds Lt and Rt, may bedependent on the position of the coefficient within the DCT block and/oron the distribution of the values of the coefficients. Moreover, theshifting factor S may be determined adaptively for each pair (R, L).Specifically, S may be determined from a parameter Sb fixed for thewhole DCT block multiplied by a coefficient position dependent shiftingvalue. The position dependent shifting value may be comprised in a shiftvalue matrix Sm.

The parameter Sb is preferably defined once per DCT block and depends onthe maximum L-values within a block, the type of the block, thequantisation matrix etc. The matrix Sm provides different shiftingvalues dependent on the position of the coefficient in the DCT block.The relative impact on the video quality of individual coefficientsdepends on the position of the coefficient within the 8×8 DCT block.Hence, the matrix Sm may reflect the individual importance of acoefficient and thus allow for individual shifting or truncation inresponse to the relative importance of a coefficient. As thecorresponding spatial frequency increases towards the lower right handcorner, it allows for the shifting operation to depend on an associatedfrequency parameter of a signal encoded by the variable length codedstream.

For different types of DCT blocks or related picture types, differentshifting matrixes may be assigned. Generally, the values of elements ofthe matrix Sm are increasing in the direction from the upper left cornertowards the lower right corner of the 8×8 DCT block, providing mainlyreduction and truncation of the high-frequency coefficients. FIG. 2 isan illustration of an example of a shifting matrix 201. Specifically,the variable length codewords of pairs (R, L), for which the entry of Smis zero, are copied from the incoming to the outgoing data streamwithout recoding.

In an embodiment where only truncation of less significant coefficientsis used without shifting of significant coefficients, the matrix Sm mayspecifically define threshold levels for dropping (truncation) ofinsignificant coefficients (i.e. the Lt value of condition 1).

During shifting, the L values of all significant coefficients arechanged. The R values should be updated according to (2) if the previouscoefficient has been truncated. In order to speed up the process oftranscoding, only coefficients with n>Nt may be shifted. The first ncoefficients may be copied without change. Typically, the low-frequencycoefficients have high L values and as seen in table 1, these tend tonot lead to a significant reduction of the variable length code size.Hence, in some embodiments the truncation and/or diminution operationmay be performed in response to an achievable word length reduction forat least one of the coefficients.

An example of a specific algorithm for transcoding of the DCTcoefficients in variable length code domain using shifting is providedby the following pseudo code: eob_not_read = 1; n = 0; while(eob_not_read) { < decode VL codeword to receive Ri, Li > if (decoded VLcodeword = eob.) eob_not_read = 0; else { n = n + Ri + 1;/* position ofcurrent coefficient */ Si = Sb * S[l, j]; /* definition of the shiftingparameter */ if (n < Nt) < copy VL codeword to outgoing stream > else if(Li < Si) Tr = 1; else { Li = Li − Si; if (Tr =1) R_(i) = R_(i−1) + 1 +R_(i); < VL coding of (Li; Ri) coefficient >; Tr = 0; } } }.

In some embodiments, the truncation part of this algorithm may beimplemented separately. In this case, the above code should be changedby skipping the operation Li=Li−S.

In the preferred embodiment, both truncation of significant coefficientsand shifting of less significant coefficients are performed. A suitabledecoder furthermore comprises a receiver which receives the transcodedstream from the transcoder. In addition, it comprises a shift valuereceiver which receives information related to the value of shift valueparameter used for shifting the coefficient values. The shift valueparameter is fed to a shift processor that generates shift compensateddata by performing an inverse shifting operation on the shiftedcoefficient values. The inverse shifting operation is performedaccording to the received shift value parameter. The resulting datastream is fed to a decode processor for decoding the underlying signal,and specifically the decode processor may perform a conventional MPEG2decoding process.

In some embodiments, the encode processor 109 is operable to generate ascalable signal data stream comprising the transcoded data stream as abase layer and at least one additional enhancement layer. Hence, in onesuch embodiment, the transcoded data stream is implemented as a baselayer and at least one enhancement layer is generated comprising some orall of the information lost during the truncation operation of the lesssignificant coefficients.

FIG. 3 is an illustration of a transcoder for generating a scalable datastream in accordance with an embodiment of the invention. The trancodercorresponds to that of FIG. 1 with an encode processor 109 operable togenerate a scalable signal.

The transcoder comprises a subset processor 105 connected to the encodeprocessor 109 and truncation processor 111 as previously described. Theencode processor 109 comprises a base layer encode processor 301 whichgenerates the transcoded stream in accordance with the previousdescription. This transcoded stream is output as a base layer.

In the described embodiment, the truncation processor 111 does notdiscard any information lost in the truncation and/or diminutionoperations. Rather, this information is fed to a first enhancement layerprocessor 303 of the encode processor 109. Specifically, the remaindertruncation and/or shifting values left over from the truncationprocessor 111 operation are fed to the first enhancement layer processor303. The first enhancement layer processor 303 is connected to a firstenhancement layer encode processor 305, and in one embodiment, theremainder coefficient values are simply encoded as a first enhancementlayer by the first enhancement layer encode processor 305.

However, in the described embodiment, the first enhancement layerprocessor 303 performs a further truncation, and specifically ashifting, operation on the remainder coefficients. This further dividesthe remainder coefficients into more significant bits and lesssignificant bits. The more significant bits are fed to the firstenhancement layer encode processor 305, which combines these into a datastream, which is output as a first enhancement layer.

The least significant bits thus correspond to a second set of remaindervalues which are fed to a second enhancement layer processor 307. Thissecond enhancement layer processor 307 feeds the second remaindercoefficient values to a second enhancement layer encode processor 309,which generates a second enhancement layer therefrom.

Accordingly, the transcoder generates a base layer as a bit rate reduceddata stream. This base layer comprises all necessary information fordecoding the underlying signal albeit at a reduced quality level. Someor all of the information lost in the transcoding is provided in one ormore further enhancement layers which may optionally be used to improvethe decoded quality level.

In one scalable transcoder embodiment, the truncation and diminution ofcoefficients is performed by shifting of the value of the coefficient(the L value) by a given shift value. In this case the significantcoefficients are automatically determined as the coefficients having anon-zero value following the shift.

In this embodiment, the levels which have been shifted out are fed tothe next enhancement layer processor. This enhancement layer processoralso performs a shifting operation. The coefficients having a non-zerovalue following the shift are encoded as the next enhancement layer.This process is repeated in consequent enhancement layer processorswhereby a plurality of enhancement layers may easily be generated.

Hence, a coefficient is regarded as significant if its L value is biggerthan the shifting parameter, and otherwise the coefficient is consideredless significant. The value of the shifting parameter defines the numberof enhancement layers and the size of the base layer. If the value ofthe shifting parameter is high enough to generate several enhancementlayers, each layer will have different priority. The higher the L valueof the less significant coefficients located within an enhancementlayer, the higher the priority of this layer.

During shifting, the L values of all significant coefficients arechanged. The new L′ values are determined by subtracting the shiftingparameter from the original L value:L′=L−S,where S is the shifting parameter.

The R values of significant coefficients should be changed only in casethe previous coefficient was insignificant and has been allocated in anenhancement layer.

In case of the current coefficient being less significant, it should beallocated in the enhancement layer. It is possible to generate severalenhancement layers simultaneously. In order to define in whichenhancement layer the less significant coefficient should be allocated,its L value is compared with decreasing values of the shifting parameter(in the enhancement layer processors). The R value of less significantcoefficient is redefined according to the new locations and R values ofthe previous coefficients. In this way, each enhancement layer isencoded separately and in parallel. This may allow for a fasttranscoding thus enabling high data rates and/or low delays.

The variable length decoder on the receiving side may decode layerseither independently and in parallel, or may first reconstruct thecomplete stream in the variable length domain from the received layersbefore decoding one stream.

An example of a specific algorithm for transcoding of the DCTcoefficients in variable length code domain with generation of layeringenhance information is provided by the following pseudo code:eob_not_read = 1; n = 0; i=0; K0=K1=...Kn=0; /* number of previouscoefficient in current layer */ while (eob_not_read) { <decode variablelength codeword to receive Ri, Li>; i=i+1 ; /* number of decodedvariable length codeword */ if (decoded variable length codeword = eob.)eob_not_read = 0; else { n = n + Ri + 1; / * position of currentcoefficient in the incoming scanned DCT block */ if (n < Nt) { <copyvariable length codeword to the outgoing stream> K0=i; } else if(Li > S){ Li = Li − S;${R_{i} = {{\sum\limits_{j = {{Ko} + 1}}^{i - 1}R_{j}} + R_{i}}};$ K0 =i; < variable length coding of (Li; Ri) coefficient in BL >; } else { h= 1 ; v = 1 ; while (h<S) { if (Li>=S − h) {$R_{i} = {{\sum\limits_{j = {{Kv} + 1}}^{i - 1}R_{j}} + R_{i}}$ Kv = i;< variable lenght coding of (Li; Ri) coefficient in EL v>; h=S; } else {h = h+1; v = v+1; } } } } }

In this algorithm, v is the number of enhancement layers, v=1 definesthe enhancement layer with highest priority (next after the base layer).Kv is the number of the last coefficient coded in enhancement layer v.The process is carried out until code of “end of block” (e.o.b.) fromthe incoming stream is received.

Typically all R values of all coefficients within enhancement layers aremodified as are some of the coefficients in base layer. The new R valueof coefficient is defined as a sum of the original R values of thecoefficients located in the incoming stream between the currentcoefficient and the last coefficient positioned in the current layer.

The shifting parameter S may be determined in response to a ratio of thebit-rate transcoding data rate reduction. The larger the differencebetween the bit-rates of the incoming and the transcoded stream, thehigher the value of the shift parameter S. The S value may specificallybe transmitted in the beginning of the base layer stream.

In one embodiment, an encoder comprises a signal encoder for generatinga variable length coded data stream from a signal, and a transcoder asdescribed above converting the data stream from the signal encoder intoa scalable data stream.

A decoder may be implemented for a scalable data stream generated by theabove process. In one embodiment, the decoder comprises a receiver forreceiving the scalable content signal data stream. The receiver isconnected to a combine processor which generates a combined data streamby combining the coefficients of the different layers. The combineprocessor is further connected to a decode processor which generates adecoded signal from the combined data stream.

The decoder may specifically perform a separate (and/or parallel)variable length decoding for each layer, and then from the decoded DCTcoefficients of the different layers generate a single stream ofcomplete DCT block coefficients.

Alternatively, a single stream may be decoded in the variable lengthdomain. In this embodiment (R, L) pairs of coefficients are insertedfrom different layers into the correct positions within a singlecomplete stream.

The invention can be implemented in any suitable form includinghardware, software, firmware or any combination of these. However,preferably, the invention is implemented as computer software running onone or more data processors and/or digital signal processors. Theelements and components of an embodiment of the invention may bephysically, functionally and logically implemented in any suitable way.Indeed the functionality may be implemented in a single unit, in aplurality of units or as part of other functional units. As such, theinvention may be implemented in a single unit or may be physically andfunctionally distributed between different units and processors.

Although the present invention has been described in connection with thepreferred embodiment, it is not intended to be limited to the specificform set forth herein. Rather, the scope of the present invention islimited only by the accompanying claims. In the claims, the termcomprising does not exclude the presence of other elements or steps.Furthermore, although individually listed, a plurality of means,elements or method steps may be implemented by e.g. a single unit orprocessor. Additionally, although individual features may be included indifferent claims, these may possibly be advantageously combined, and theinclusion in different claims does not imply that a combination offeatures is no feasible and/or advantageous. In addition, singularreferences do not exclude a plurality. Thus references to “a”, “an”,“first”, “second” etc do not preclude a plurality.

1. A transcoder for a variable length coded data stream comprising: areceiver for receiving the variable length coded data stream comprisingvariable length coded coefficients; a significance processor fordetermining if variable length coded coefficients are significantcoefficients or less significant coefficients in accordance with asignificance criterion; a truncation processor for truncating the lesssignificant coefficients; an encode processor for generating atranscoded data stream comprising significant coefficients and truncatedless significant coefficients.
 2. A transcoder as claimed in claim 1wherein the truncation comprises setting a value of the less significantcoefficients to zero.
 3. A transcoder as claimed in claim 1 wherein thesignificance criterion comprises a criterion of whether a value of avariable length coded coefficient is above a threshold.
 4. A transcoderas claimed in claim 1 wherein the significance criterion is determinedin response to an associated frequency parameter of a signal encoded bythe variable length coded stream.
 5. A transcoder as claimed in claim 1,wherein the variable length coded coefficients are run length coded andwherein the significance criterion comprises a criterion of whether arun length of a sequence of variable length coded coefficients is abovea threshold.
 6. A transcoder as claimed in claim 1, wherein the variablelength coded coefficients are run length coded and wherein a run lengthvalue of a significant coefficient is modified to reflect increased zerocoefficients resulting from truncation of less significant coefficientsto a zero value.
 7. A transcoder as claimed in claim 1 furthercomprising a subset processor for providing a subset of the variablelength coded data stream to the encode processor; and wherein the encodeprocessor is operable to directly include the subset of the variablelength coded data stream in the transcoded data stream.
 8. A transcoderas claimed in claim 7 wherein the subset of the variable length codeddata stream comprises variable length coded coefficients associated withlow frequency parameters of a signal coded by the variable length codedstream.
 9. A transcoder as claimed in claim 7 wherein the subset of thevariable length coded data stream comprises variable length codedcoefficients associated with motion compensation parameters of a videosignal coded by the variable length coded stream.
 10. A transcoder asclaimed in claim 7 wherein the subset of the variable length coded datastream comprises control data.
 11. A transcoder as claimed in claim 7wherein the subset of the variable length coded data stream comprisesheader data.
 12. A transcoder as claimed in claim 1 wherein thetruncation processor is further operable to perform a diminutionoperation on values of the significant coefficients.
 13. A transcoder asclaimed in claim 12 wherein the diminution operation is a shiftingoperation.
 14. A transcoder as claimed in claim 12 wherein thediminution operation depends on an associated frequency parameter of asignal encoded by the variable length coded stream.
 15. A transcoder asclaimed in claim 12 wherein the diminution operation depends on a runlength associated with at least one variable length coded coefficient.16. A transcoder as claimed in claim 12 wherein a diminution operationparameter is depending on a plurality of coefficient values of thesignificant coefficients.
 17. A transcoder as claimed in claim 12wherein a diminution operation parameter depends on an achievable wordlength reduction for at least one of the significant coefficients.
 18. Atranscoder as claimed in claim 1 wherein the variable length codedcoefficients comprise quantised Discrete Cosine Transform coefficientsof a compressed video signal.
 19. A transcoder as claimed in claim 1wherein the encode processor is operable to generate a scalable signaldata stream comprising the transcoded data stream as a base layer and atleast one additional enhancement layer.
 20. A transcoder as claimed inclaim 19 wherein the truncation processor is operable to generateremainder coefficient values associated with the truncation of the lesssignificant coefficients, and the at least one additional enhancementlayer comprises at least some of the remainder coefficient values.
 21. Atranscoder as claimed in claim 19 wherein the truncation processor isoperable to perform a shifting operation on the significant coefficientsand to generate remainder coefficient values associated with theshifting operation; and the at least one additional enhancement layercomprises at least some of the remainder coefficient values.
 22. Atranscoder as claimed in claim 21 wherein the truncation processor isfurther operable to perform a second shifting operation on the remaindercoefficient values and to generate second remainder coefficient values,and the encoding processor is operable to include at least some of thesecond remainder coefficient values in a second enhancement layer. 23.An encoder for encoding a signal comprising: a signal encoder forgenerating a variable length coded data stream from the signal; thevariable length coded data stream comprising variable length codedcoefficients; a significance processor for determining if variablelength coded coefficients are significant coefficients or lesssignificant coefficients in accordance with a significance criterion; atruncation processor for truncating the less significant coefficientsand for generating remainder coefficient values associated with thetruncation of the less significant coefficients; and an encode processorfor generating a scalable signal data stream comprising a base layercomprising significant coefficients and truncated less significantcoefficients and an enhancement layer comprising at least some of theremainder coefficient values.
 24. A decoder for decoding a scalablecontent signal data stream; the decoder comprising: a receiver forreceiving the scalable content signal data stream; the scalable contentsignal data stream comprising a base layer comprising significantcoefficients and truncated less significant coefficients, and anenhancement layer comprising remainder coefficient values associatedwith the truncated less significant coefficients; a combine processorfor generating a combined data stream from combining the variable lengthcoded coefficients and truncated less significant coefficients of thebase layer and the remainder coefficient values of the enhancementlayer; and a decode processor for generating a decoded signal inresponse to the combined data stream.
 25. A decoder for decoding avariable length coded data stream; the decoder comprising: a receiverfor receiving a variable length coded data stream comprising variablelength coded coefficients having shifted coefficient values; and a shiftprocessor for generating a shift compensated data stream by performingan inverse shifting operation on the variable length coded coefficientshaving shifted coefficient values; and a decode processor for generatinga decoded signal in response to the shift compensated data stream.
 26. Adecoder as claimed in claim 25 further comprising a shift value receiverfor receiving a shift value parameter associated with the shiftedcoefficient values and wherein the inverse shifting operation isdetermined in response to the shift value parameter.
 27. A method oftranscoding of a variable length coded data stream, the methodcomprising the steps of: receiving the variable length coded data streamcomprising variable length coded coefficients; determining if variablelength coded coefficients are significant coefficients or lesssignificant coefficients in accordance with a significance criterion;truncating the less significant coefficients; and generating atranscoded data stream comprising significant coefficients and truncatedless significant coefficients.
 28. A computer program product enablingthe carrying out of a method according to claim 27.